package com.booter.datasource;

import com.bstek.ureport.definition.datasource.BuildinDatasource;
import org.springframework.beans.factory.annotation.Autowired;

import javax.sql.DataSource;
import java.sql.Connection;

/**
 * @author xueqiu
 * @date 2023/3/22 19:49
 */
//@Component
public class UReportDataSource implements BuildinDatasource {
    @Autowired
    private DataSource dataSource;

    @Override
    public String name() {
        return "ureport2数据源";
    }

    @lombok.SneakyThrows
    @Override
    public Connection getConnection() {
        return dataSource.getConnection();
    }
}
